import request from '@/utils/request'

// 查询请假申请列表
export function listDutyApply(query) {
  return request({
    url: '/oa/dutyApply/list',
    method: 'get',
    params: query
  })
}

// 查询请假申请详细
export function getDutyApply(id) {
  return request({
    url: '/oa/dutyApply/' + id,
    method: 'get'
  })
}

// 新增请假申请
export function addDutyApply(data) {
  return request({
    url: '/oa/dutyApply',
    method: 'post',
    data: data
  })
}

// 修改请假申请
export function updateDutyApply(data) {
  return request({
    url: '/oa/dutyApply',
    method: 'put',
    data: data
  })
}

// 删除请假申请
export function delDutyApply(id) {
  return request({
    url: '/oa/dutyApply/' + id,
    method: 'delete'
  })
}



//提交流程
export function submitFlow(id){
    return request({
        url: '/oa/dutyApply/submitFlow/'+id,
        method: 'post'
    })
}

export function cancleFlow(id){
    return request({
        url: '/oa/dutyApply/cancleFlow/'+id,
        method: 'post'
    })
}
